<script lang="ts" setup>
import useCounterStore from '@/store/module/count/index';
import { storeToRefs } from 'pinia';

const counterStore = useCounterStore();
const { count, obj } = storeToRefs(counterStore);

console.log(obj.value);

</script>

<template>
    <div>
        HomePage-{{ count }}
        <h1>my name is {{ obj.name }}, age is {{ obj.age }}</h1>
        <button @click="counterStore.increment()">+</button>
        <button class="ml-4" @click="counterStore.changeObj({name: 'hh', age: 19})">changeObj</button>
    </div>
</template>